package com.efast.dmom.equipment.dao.repair;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.efast.dmom.equipment.bean.EquipRepairListBean;
import com.efast.dmom.equipment.bean.EquipmentRepairQueryBean;
import com.efast.dmom.equipment.bean.repair.EquipPartBean;
import com.efast.dmom.equipment.bean.repair.EquipRepairInfoBean;
import com.efast.dmom.equipment.bean.repair.EquipRepairOrderBean;
import com.efast.dmom.equipment.bean.repair.EquipRepairOrderRequestBean;
import com.efast.dmom.equipment.bean.repair.EquipRepairPlanBean;
import com.efast.dmom.equipment.bean.repair.EquipRepairerBean;
import com.efast.dmom.equipment.bean.repair.EquipSpareBean;
import com.efast.dmom.equipment.bean.repair.EquipSpareConsumptionBean;

/** 

* @author 作者 Aaron Liu: 

* @version 创建时间：2019年8月15日 下午3:54:06 

* 类说明 

*/
public interface EquipRepairOrderDao {

    /**
	 *删除订单信息
     * @param id
     */
    public void deleteRepairOrder(@Param(value = "id") Integer id);

    /**
     * 分页查询 维修单据列表（包含当前用户具备的单据操作handle）
     * @param queryBean
     * @return
     */
    public List<EquipRepairListBean> queryRepairOrderByPage(EquipmentRepairQueryBean queryBean);

    /**
     * 分页查询 维修单据列表（包含当前用户具备的单据操作handle）
     * @param queryBean
     * @return
     */
    public int countRepairOrder(EquipmentRepairQueryBean queryBean);
    
    public void createRepairOrder(EquipRepairOrderBean orderBean);
    
    public void updateRepairOrder(EquipRepairOrderBean orderBean);
    
    public void addConsumptionList(List<EquipSpareConsumptionBean> beanList);
    
    public void addRepairerList(List<EquipRepairerBean> repairerList);
    
    public void updateRepairOrderStatus(@Param(value = "orderId") Integer orderId, @Param(value = "status") String status);
    
    public List<EquipRepairerBean> getUserByGroupName(@Param(value = "groupName") String groupName);
    
    public EquipRepairOrderBean getRepairOrderDetails(@Param(value = "orderId") Integer orderId);
    
    public List<EquipSpareConsumptionBean> getConsumptionByOrderId(@Param(value = "orderId") Integer orderId);
    
    public List<EquipRepairerBean> getRepairerByOrderId(@Param(value = "orderId") Integer orderId);
    
    public List<EquipRepairOrderBean> getRepairOrderByStatus(EquipRepairOrderRequestBean requestBean);
    
    public List<EquipSpareBean> getEquipSpare(@Param(value = "partName") String partName);
    
    public List<EquipPartBean> getEquipPart(@Param(value = "category") String category);
    
    public void updateSpareInventory(@Param(value = "spareName") String spareName, @Param(value = "count") Integer count);
    
    public void deleteConsumptionByOrderId(@Param(value = "orderId") Integer orderId);
    
    public void deleteRepairerInfoByOrderId(@Param(value = "orderId") Integer orderId);

	public List<EquipRepairInfoBean> getRepairInfoByPlanId(@Param(value = "id") Integer id);

	public List<EquipSpareConsumptionBean> getSpareInfoByPlanId(@Param(value = "id") Integer id);
	
}
